package com.rongji.dfish.demo.index.service;

import com.rongji.dfish.base.Utils;

/**
 * 用于管理定位信息。
 * @author LinLW
 *
 */
public class AnchorHelper {
	public static final String SPLIT="@";
//	public static final String PREFIX_TEMPLATE="@";
//	public static final String PREFIX_MOD_EDITOR="@";
//	public static final String PREFIX_INTRODUCE="@";
//	public static final String PREFIX_DOWNLOAD="@";
//	public static final String PREFIX_COMMUNITY="@";
//	private static final String[][] PREFIXS={
//		//首页 (略)
//		{DemoConstants.MOD_TEMPLATE,PREFIX_TEMPLATE},//示例
//		{DemoConstants.MOD_EDITOR,PREFIX_MOD_EDITOR},//体验
//		{DemoConstants.MOD_INTRODUCE,PREFIX_INTRODUCE},//文档
//		{DemoConstants.MOD_DOWNLOAD,PREFIX_DOWNLOAD},//下载
//		{DemoConstants.MOD_COMMUNITY,PREFIX_COMMUNITY},//社区
//	};
	
	private static AnchorHelper instance=new AnchorHelper();
	private AnchorHelper(){
		
	}
	public static AnchorHelper getInstance() {
		return instance;
	}
	public String getModleKey(String anchor) {
		String[] info=getAnchorInfo(anchor);
		if(info==null||info.length<1){
			return null;
		}
		if(Utils.isEmpty(info[0])){
			return null;
		}
		return info[0];
	}
	public String[] getAnchorInfo(String anchor) {
		if(anchor==null){
			return null;
		}
		return anchor.split(SPLIT);
	}
	

}
